import {getClient} from '../utils/util'
import {getPath} from './util'

let client = getClient;

const RouterCourse = [
  {
    path: getPath('/course/coursedetail/:courseId'),
    name: 'coursedetail',
    component: resolve => require([`@/pages/course/coursedetail/course-${client()}`], resolve),
    meta:{
      title:'课程详情'
    }
  },
   {
    path: getPath('/test/:examId/:courseId'),
    name: 'test',
    component: resolve => require([`@/pages/course/test/test-${client()}`], resolve),
    meta: {
      requireAuth: true
    }
  },
  {
    path: getPath('/plan/:planId'),
    name: 'plan',
    component: resolve => require([`@/pages/plan/plan-detail-${client()}`], resolve),
    meta: {
      requireAuth: true
    }
  },
  {
    path: '/cert/:certId/:userId',
    name: 'cert',
      component: resolve => require([`@/pages/plan/certificat/certificat`], resolve),
      meta: {
        requireAuth: false,
        hideHeader: true,
        title: '证书信息',
    }
  },
  {
    path: getPath('/mycerti'),
    name: 'mycerti',
    component: resolve => require([`@/pages/plan/mycerti/index`], resolve),
    meta: {
      title: '我的证书'
    },
  },
  {
    path: getPath('/mycourse'),
    name: 'mycourse',
    component: resolve => require([`@/pages/course/mycourse/index`], resolve),
    meta: {
      title: '我的课程'
    },
  },
];

export default RouterCourse
